
///import js-src/lib/
///import js-src/com/
qui(function (require, exports, module) {
    SysConfig.Config = $.extend({}, Ancestor.Config, {
        TABLE_COLMODEL_CONFIG:{
            type:{
                name: "type",
                index: 'type',
                title: false,
                sortable: false,
                width: 150
            },
            key:{
                name: "key",
                index: 'key',
                title: false,
                sortable: false,
                width: 60
            },
            val:{
                name: "val",
                index: 'val',
                title: false,
                sortable: false,
                width: 180
            },
            descr:{
                name: "desc",
                index: 'desc',
                title: false,
                sortable: false,
                width: 300
            },
            status:{
                name: "status",
                index: 'status',
                title: false,
                sortable: false,
                align: 'center',
                width: 60,
                formatter: function (v, o, r) {
                    return SysConfig.Util.formatter.status(v, o, r);
                }
            },
            operator_config:{
                title: false,
                width: 105,
                align: 'center',
                sortable: false,
                formatter: function (v, o, r) {
                    return SysConfig.Util.formatter.operator_config(v, o, r);
                }
            }
        },
        TABLE_LIST:{
            multiselect: false,
            datatype: "local",
            loadtext: '加载中...',
            localReader: {
                id: "id",
                root: "rows",
                page: "page",
                total: "total",
                records: "records"
            },
            rowNum:40,
            colModel:["type","key","val","descr","status","operator_config"],
            colNames:["类型", "索引", "值", "描述","启用状态","操作"],
            pager: "#pager",
            onPaging: function (pgButton) {
                var retValue = SysConfig.Util.pageBeanPageHandler("list", "pager", SysConfig.Config.PageBean, pgButton);
                if (retValue != null) {
                    $("#list")[0].addJSONData(retValue)
                }
                return "stop";
            }
        },
        SORT_RULE:{
            asc_type_key:function(a, b) {
                if(a.type == b.type){
                    return  a.key > b.key ? 1 : -1
                }
                return a.type > b.type ? 1 : -1
            }
        }
    })
})